import request from '@/utils/request'
const module = '/admin/product/brand'

export const getBrands = (pageNum, pageSize) => {
    return request({
      url: `${module}/list/${pageNum}/${pageSize}`,
      method: 'get'
    })
  }

  export const saveBrand = brand => {
    return request({
      url: `${module}/save`,
      method: 'post',
      data: brand,
    })
  }
  export const deleteBrandById = id => {
    return request({
      url: `${module}/deleteById/${id}`,
      method: 'delete',
    })
  }
  export const updateBrand = (brand) => {
    return request({
      url: `${module}/update`,
      method: 'put',
      data:brand
    })
  }
  export const getBrandById = id => {
    return request({
      url: `${module}/getById/${id}`,
      method: 'get',
    })
  }

  export const getAllBrands = () => {
    return request({
      url: `${module}/list`,
      method: 'get'
    })
  }